<template>
    <Layout>
        <Form ref="form1" :model="form1" :label-width="120">
            <Row class="query-form" style="padding-top: 15px">
                <Col span="8">
                    <FormItem label="是否整改:">
                        <Select v-model="form1.ifRectif" @on-change="changeSelect">
                            <Option value="1">已整改</Option>
                            <Option value="0">未整改</Option>
                        </Select>
                    </FormItem>
                </Col>
                <Col span="8">
                    <FormItem label="检查名称:">
                        <Input type="text" v-model="form1.taskName"/>
                    </FormItem>
                </Col>
                <Col span="8" v-if="!switchFlag">
                    <Button @click="switchQuery(true)" class="ivu-btn-switch" type="text">展开∨</Button>
                    <Button @click="reset" class="ivu-btn-reset">重置</Button>
                    <Button type="primary" class="ivu-btn-query" icon="md-search" @click="query">查询</Button>
                </Col>
                <Col span="8" v-else>
                    <FormItem label="问题状态:">
                        <Select v-model="form1.reportStatus">
                            <!--<Option value=""></Option>-->
                            <!--<Option value="0">新建</Option>-->
                            <!--<Option value="1">审核中</Option>-->
                            <Option v-for="item in reportStatus" :value="item.id" :key="item.id">{{item.name }}</Option>
                            <!--<Option value="2">待整改</Option>
                            <Option value="3">整改中</Option>
                            <Option value="4">待验证</Option>
                            <Option value="5">验证中</Option>
                            <Option value="6">已关闭</Option>
                            <Option value="7">验证驳回</Option>-->
                        </Select>
                    </FormItem>
                </Col>
            </Row>
            <Row v-show="switchFlag" class="query-form" style="padding-top: 10px">
                <Col span="8" :offset="16">
                    <Button @click="switchQuery(false)" class="ivu-btn-switch" type="text">收起∧</Button>
                    <Button @click="reset" class="ivu-btn-reset">重置</Button>
                    <Button type="primary" class="ivu-btn-query" icon="md-search" @click="query">查询</Button>
                </Col>
            </Row>
        </Form>

        <Table ref='table' :loading="loading" size="small" :height="tableHeight" class="table" no-data-text="没有查询到相关数据!"
               highlight-row stripe border :columns="columns1" width="100%" :data="dataTable">
        </Table>

        <Row style="margin-right:10px;">
            <Col span="24">
                <Page style="float: right" :total="pagedata.total" :page-size="pagedata.pageSize"
                      @on-change="pageChange" @on-page-size-change="pageSizeChange" :page-size-opts="pageSizeArray"
                      show-total show-sizer show-elevator/>
            </Col>
        </Row>
        <Modal title="问题整改" :transfer=false v-model="model1" :width=1000>
            <Form ref="dataForm" :model="dataForm" :label-width="120" :rules="ruleCustom">
                <Row>
                    <Col span="24" style="font-size:18px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:18px;color:#464c5b;font-weight: bold">问题基本信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="检查名称:" prop="taskName">
                            {{chkProblem.taskName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="存在单位:" prop="existOrgName">
                            {{chkProblem.existOrgName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="检查人:" prop="reportUserName">
                            {{chkProblem.reportUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="检查日期:" prop="reportDate">
                            {{chkProblem.reportDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="11">
                        <FormItem label="问题类型:" prop="problemType">
                            {{chkProblem.problemType=='1'?'基础管理' : '现场管理'}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="问题状态:" prop="reportStatus">
                            {{chkProblem.reportStatusName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="问题图片:" prop="reportFile">
                            <div class="demo-upload-list" v-for="item in uploadList" :key="item.id">
                                <img :src="item.url">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline" @click.native="handleView(item.name,item.url)"></Icon>
                                </div>
                            </div>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="问题描述:" prop="reportDesc">
                            {{chkProblem.reportDesc}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="要求整改时间:" prop="reportDesc">
                            {{chkProblem.rectifyDate}}
                        </FormItem>
                    </Col>
                </Row>
               <!-- <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="备注:" prop="notes">
                            {{chkProblem.notes}}
                        </FormItem>
                    </Col>
                </Row>-->
               <!-- <Row>
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:18px;color:#464c5b;font-weight: bold">问题审核信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="审核人:" prop="assignUserId">
                            {{chkAssign.assignUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="审核日期:" prop="assignDate">
                            {{chkAssign.assignDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="11">
                        <FormItem label="整改人:" prop="expectUser">
                            {{chkAssign.expectUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="整改期限:" prop="expectDate">
                            {{chkAssign.expectDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改要求:" prop="expectRect">
                            {{chkAssign.expectRect}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="审核图片:" prop="reportFile">
                            <div class="demo-upload-list" v-for="item in auditImgs" :key="item.id">
                                <img :src="item.url">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline" @click.native="handleView(item.name,item.url)"></Icon>
                                </div>
                            </div>
                        </FormItem>
                    </Col>
                </Row>-->
                <!-- <Row>
                     <Col span="24" style="font-size:16px;color:#464c5b;font-weight: bold">
                         <Divider orientation="left">问题历史整改信息</Divider>
                     </Col>
                 </Row>-->
                <Row>
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:18px;color:#464c5b;font-weight: bold">问题整改信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改人:" prop="rectifyUser">
                            <Input v-model="dataForm.rectifyUser" v-show="false" type="text"/>
                            <Input v-model="dataForm.rectifyUserName" readonly type="text"/>
                           <!-- <Select
                                ref="select"
                                placeholder="请输入关键字查询"
                                v-model="dataForm.rectifyUser"
                                filterable
                                :remote-method="remoteMethod1"
                                :loading="loading1">
                                <Option v-for="(option, index) in options1" :value="option.userId" :label="option.userName" :key="option.userId">
                                    <span>{{option.userName}}</span>
                                    <span style="float:right;color:#ccc">{{option.orgInfo.orgName}}</span>
                                </Option>
                            </Select>-->
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="参与人:" prop="rectifyPersion">
                            <Input v-model="dataForm.rectifyPersion" type="text"/>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改开始日期:" prop="rectifyDate">
                            <DatePicker type="date" style="width: 100%" format="yyyy-MM-dd"
                                        v-model="dataForm.rectifyDate"></DatePicker>
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="整改结束日期:" prop="expirationTime">
                            <DatePicker type="date" style="width: 100%" format="yyyy-MM-dd"
                                        v-model="dataForm.expirationTime"></DatePicker>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改情况描述:" prop="rectifyDesc">
                            <Input v-model="dataForm.rectifyDesc" type="textarea" :autosize="{minRows: 3,maxRows: 5}"/>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改期限:">
                            {{chkAssign.expectDate}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="验证人:">
                            {{dataForm.verifierName}}
                           <!-- <Select
                                ref="select"
                                placeholder="请输入关键字查询"
                                v-model="dataForm.verifier"
                                filterable
                                :remote-method="remoteMethod2"
                                :loading="loading2">
                                <Option v-for="(option, index) in options2" :value="option.userId" :label="option.userName" :key="option.userId">
                                    <span>{{option.userName}}</span>
                                    <span style="float:right;color:#ccc">{{option.orgInfo.orgName}}</span>
                                </Option>
                            </Select>-->
                        </FormItem>
                    </Col>
                    <Col span="11">
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改图片：">
                            <div class="demo-upload-list" v-for="(item, index) in fileList" :key="index">
                                <template>
                                    <img :src="item.imgBase64">
                                    <div class="demo-upload-list-cover">
                                        <Icon type="ios-eye-outline" @click.native="handleView(item.name,item.imgBase64)"></Icon>
                                        <Icon type="ios-trash-outline" @click.native="handleRemove1(item.keyID)"></Icon>
                                    </div>
                                </template>
                            </div>
                            <div class="demo-upload-list" v-for="item in uploadImgs" :key="item.id">
                                <img :src="item.url">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline" v-if="item.url" @click.native="handleView(item.name,item.url)"></Icon>
                                    <Icon type="ios-trash-outline" v-if="!editable"></Icon>
                                    <Icon type="ios-trash-outline" v-else @click.native="handleRemove(item)"></Icon>
                                </div>
                            </div>
                            <Upload
                                    ref="upload"
                                    :show-upload-list="false"
                                    :format="['jpg','jpeg','png']"
                                    :max-size="1024"
                                    :on-format-error="handleFormatError"
                                    :on-exceeded-size="handleMaxSize"
                                    :before-upload="handleBeforeUpload"
                                    multiple
                                    type="drag"
                                    :action="upUrl"
                                    :disabled="!editable"
                                    style="display: inline-block;width:58px;">
                                <div style="width: 58px;height:58px;line-height: 58px;">
                                    <Icon type="ios-camera" size="20"></Icon>
                                </div>
                            </Upload>
                        </FormItem>
                    </Col>
                </Row>
            </Form>
            <div slot="footer">
                <Button type="primary" class='ivu-btn-save' :loading="buttonLoading" @click="saveData('2')" style="margin-left: 6px">提交</Button>
                <!--<Button type="primary" class='ivu-btn-save' :loading="buttonLoading" @click="saveData('1')" style="margin-left: 2px">确定</Button>-->
                <Button type="primary" class='ivu-btn-cancel' @click="handleCancel"
                        style="margin-left: 2px">取消
                </Button>
            </div>
        </Modal>
        <Modal v-model="visible">
            <img :src="viewUrl" v-if="visible" style="width: 100%">
            <div slot="footer">
                <Button type="primary" class='ivu-btn-save'  @click="visible=false">关闭</Button>
            </div>
        </Modal>
        <Modal title="问题查看" :transfer=false class="modal-view-detail" v-model="viewModal" :width=900>
            <Form ref="viewForm" :label-width="100">
                <Row>
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:18px;color:#464c5b;font-weight: bold">问题基本信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="检查名称:" prop="taskName">
                            {{chkProblem.taskName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="存在单位:" prop="existOrgName">
                            {{chkProblem.existOrgName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="检查人:" prop="reportUserName">
                            {{chkProblem.reportUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="检查日期:" prop="reportDate">
                            {{chkProblem.reportDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="问题类型:" prop="problemType">
                            {{chkProblem.problemType=='1'?'基础管理' : '现场管理'}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="问题状态:" prop="reportStatus">
                            {{chkProblem.reportStatusName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="问题图片:" prop="reportFile">
                            <div class="demo-upload-list" v-for="item in uploadList" :key="item.id">
                                <img :src="item.url">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline" @click.native="handleView(item.name,item.url)"></Icon>
                                </div>
                            </div>
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="问题描述:" prop="reportDesc">
                            {{chkProblem.reportDesc}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="要求整改时间:" prop="reportDesc">
                            {{chkProblem.rectifyDate}}
                        </FormItem>
                    </Col>
                </Row>
               <!-- <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="备注:" prop="notes">
                            {{chkProblem.notes}}
                        </FormItem>
                    </Col>
                </Row>-->
               <!-- <Row>
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:18px;color:#464c5b;font-weight: bold">问题审核信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="审核人:" prop="assignUserId">
                            {{chkAssign.assignUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="审核日期:" prop="assignDate">
                            {{chkAssign.assignDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="11">
                        <FormItem label="整改人:" prop="expectUser">
                            {{chkAssign.expectUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="整改期限:" prop="expectDate">
                            {{chkAssign.expectDate}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改要求:" prop="expectRect">
                            {{chkAssign.expectRect}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="detail-background-clor">
                    <Col span="23">
                        <FormItem label="审核图片:" prop="reportFile">
                            <div class="demo-upload-list" v-for="item in auditImgs" :key="item.id">
                                <img :src="item.url">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline" @click.native="handleView(item.name,item.url)"></Icon>
                                </div>
                            </div>
                        </FormItem>
                    </Col>
                </Row>-->
                <Row v-if="bohui.length > 0">
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span style="font-size:18px;color:#464c5b;font-weight: bold">问题整改历史信息</span>
                        </Divider>
                    </Col>
                </Row>
                <div v-for="(item,index) in bohui" :key="index">
                    <Row>
                        <Col span="24" style="font-size:18px;color:#464c5b;font-weight: bold">
                            <Divider orientation="left"><span style="font-size:16px;color:#464c5b;font-weight: bold">第{{index+1}}次整改</span>
                            </Divider>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                            <FormItem label="整改人:" prop="rectifyUser">
                                {{item.chkRectify.rectifyUserName}}
                            </FormItem>
                        </Col>
                        <Col span="11">
                            <FormItem label="参与人:" prop="rectifyPersion">
                                {{item.chkRectify.rectifyPersion}}
                            </FormItem>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                            <FormItem label="整改开始日期:" prop="rectifyDate">
                                {{item.chkRectify.rectifyDate}}
                            </FormItem>
                        </Col>
                        <Col span="11">
                            <FormItem label="整改结束日期:" prop="expirationTime">
                                {{item.chkRectify.expirationTime}}
                            </FormItem>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                            <FormItem label="整改情况描述:" prop="rectifyDesc">
                                {{item.chkRectify.rectifyDesc}}
                            </FormItem>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                            <FormItem label="验证人:" prop="verifier">
                                {{item.chkRectify.verifierName}}
                            </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                            <FormItem label="整改图片:" prop="reportFile">
                                <div class="demo-upload-list" v-for="obj in item.chkRectify.fileIds" :key="obj">
                                    <img :src="filesUrl + '/' + obj">
                                    <div class="demo-upload-list-cover">
                                        <Icon type="ios-eye-outline"
                                              @click.native="handleView(obj,filesUrl + '/' + obj)"></Icon>
                                    </div>
                                </div>
                            </FormItem>
                        </Col>
                    </Row>

                    <Row>
                        <Col span="24" style="font-size:18px;color:#464c5b;font-weight: bold">
                            <Divider orientation="left"><span style="font-size:16px;color:#464c5b;font-weight: bold">第{{index+1}}次验证</span>
                            </Divider>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                            <FormItem label="验证人:" prop="verifier">
                                {{item.chkVerify?item.chkVerify.verifierName:''}}
                            </FormItem>
                        </Col>
                        <Col span="11">
                            <FormItem label="验证日期:" prop="verifyDate">
                                {{item.chkVerify?item.chkVerify.verifyDate:''}}
                            </FormItem>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                            <FormItem label="整改结果:" prop="verifyResult">
                                {{item.chkVerify?(item.chkVerify.verifyResult=='1'?'通过':'不通过'):''}}
                            </FormItem>
                        </Col>
                        <Col span="11" v-if="item.chkVerify&&item.chkVerify.verifyResult=='1'">
                            <FormItem label="关闭日期:" prop="closedDate">
                                {{item.chkVerify?item.chkVerify.closedDate:''}}
                            </FormItem>
                        </Col>
                        <Col span="11" v-else></Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                            <FormItem label="验证情况描述:" prop="verifyDesc">
                                {{item.chkVerify?item.chkVerify.verifyDesc:''}}
                            </FormItem>
                        </Col>
                    </Row>
                    <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                            <FormItem label="验证图片:" prop="reportFile">
                                <div class="demo-upload-list" v-for="obj in (item.chkVerify?item.chkVerify.fileIds:'')" :key="obj">
                                    <img :src="filesUrl + '/' + obj">
                                    <div class="demo-upload-list-cover">
                                        <Icon type="ios-eye-outline"
                                              @click.native="handleView(obj,filesUrl + '/' + obj)"></Icon>
                                    </div>
                                </div>
                            </FormItem>
                        </Col>
                    </Row>
                </div>

            <!--    <Row>
                    <Col span="24" style="font-size:20px;color:#464c5b;font-weight: bold">
                        <Divider orientation="left"><span
                                style="font-size:16px;color:#464c5b;font-weight: bold">问题整改信息</span></Divider>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改人:" prop="rectifyUser">
                            {{viewForm.rectifyUserName}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="参与人:" prop="rectifyPersion">
                            {{viewForm.rectifyPersion}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改开始日期:" prop="rectifyDate">
                            {{viewForm.rectifyDate}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="整改结束日期:" prop="expirationTime">
                            {{viewForm.expirationTime}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改情况描述:" prop="rectifyDesc">
                            {{viewForm.rectifyDesc}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                        <FormItem label="整改期限:" prop="expectDate">
                            {{chkAssign.expectDate}}
                        </FormItem>
                    </Col>
                    <Col span="11">
                        <FormItem label="验证人:" prop="verifier">
                            {{viewForm.verifierName}}
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                        <FormItem label="整改图片:" prop="reportFile">
                            <div class="demo-upload-list" v-for="item in viewForm.fileIds" :key="item">
                                <img :src="filesUrl + '/' + item">
                                <div class="demo-upload-list-cover">
                                    <Icon type="ios-eye-outline"
                                          @click.native="handleView(item,filesUrl + '/' + item)"></Icon>
                                </div>
                            </div>
                        </FormItem>
                    </Col>
                </Row>-->
                <!-- <Row type="flex" justify="space-around" class="code-row-bg">
                     <Col span="23">
                         <FormItem>
                             <Button class='ivu-btn-save' @click="viewModal=false">关闭</Button>
                         </FormItem>
                     </Col>
                 </Row>-->

            </Form>
            <div slot="footer">
                <Button class='ivu-btn-save' @click="viewModal=false">关闭</Button>
            </div>
        </Modal>
    </layout>
</template>

<script>
    import {Api} from '../../../../api/index.js'
    import cascaderDom from '../../../../components/cascader-dom'
    import {sessionStorage} from '../../../../common/cacheUtils.js';

    export default {
        components: {
            cascaderDom
        },
        data() {
            const verifierVal = (rule, value, callback) => {
                if (this.dataForm.verifier !== null && this.dataForm.verifier !== undefined) {
                    callback();
                } else {
                    callback(new Error(' '));
                }
            };
            const rectifyUserVal = (rule, value, callback) => {
                if (this.dataForm.rectifyUser !== null && this.dataForm.rectifyUser !== undefined) {
                    callback();
                } else {
                    callback(new Error(' '));
                }
            };

            return {
                loading1:false,
                loading2:false,
                switchFlag:false,
                options1:[],
                options2:[],
                form1: {
                    ifRectif:'0'
                },
                dataForm: {},
                chkProblem: {},
                chkAssign: {},
                bohui: {},
                reportStatus:[
                    {id:2,name:'待整改'},
                    {id:3,name:'整改中'},
                    {id:7,name:'验证驳回'}
                ],
                //分页参数
                pageSizeArray: [10, 20, 50],
                pagedata: {
                    total: 0,
                    pageSize: 10,
                    currentPage: 1,
                },
                columns1: [
                    {
                        title: "序号",
                        width: 80,
                        align: "center",
                        fixed: 'left',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.currentPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    /*{
                        minWidth: 220,
                        title: '检查名称',
                        key: 'taskName',
                        align: 'center'
                    },
                    {
                        minWidth: 100,
                        title: '检查人',
                        key: 'reportUserName',
                        align: 'center'
                    },
                    {
                        minWidth: 130,
                        title: '检查日期',
                        key: 'reportDate',
                        align: 'center'
                    },*/
                   /* {
                        minWidth: 180,
                        title: '存在单位',
                        key: 'existOrgName',
                        align: 'center'
                    },*/
                   /* {
                        minWidth: 100,
                        title: '问题类型',
                        align: 'center',
                        key: 'problemType',
                        render: (h, params) => {
                            if (params.row.problemType == '1') {
                                return h('span', {}, '基础管理')
                            } else if (params.row.problemType == '2') {
                                return h('span', {}, '现场管理')
                            }
                        }
                    },*/
                    {
                        minWidth: 180,
                        title: '问题描述',
                        key: 'reportDesc',
                        align: 'center',
                        tooltip:true
                       /* render: (h, params) => {
                            return h('div', [
                                h('span', (params.row.reportDesc && params.row.reportDesc.length) < 10 ?
                                    params.row.reportDesc : params.row.reportDesc.substr(0, 9) + '...')
                            ]);
                        }*/
                    },
                    /*{
                        minWidth: 80,
                        title: '照片',
                        key: 'reportFile',
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Icon', {
                                    props: {
                                        type: 'md-eye',
                                        size: '20'
                                    },
                                    style: {
                                        marginRight: "0px"
                                    },
                                    on: {
                                        click: () => {
                                            this.viewData(params);
                                        }
                                    }
                                }),
                            ]);
                        }
                    },*/
                    {
                        minWidth: 120,
                        title: '整改期限',
                        key: 'expectDate',
                        align: 'center'
                    },
                    {
                        minWidth: 100,
                        title: '整改人',
                        key: 'rectifyUserName',
                        align: 'center'
                    },
                    {
                        minWidth: 100,
                        title: '整改结束日期',
                        key: 'expirationTime',
                        align: 'center'
                    },
                    {
                        minWidth: 100,
                        title: '整改情况描述',
                        key: 'rectifyDesc',
                        align: 'center',
                        tooltip:true
                    },
                    {
                        minWidth: 100,
                        title: '验证人',
                        key: 'verifierName',
                        align: 'center'
                    },
                    {
                        minWidth: 120,
                        title: '问题状态',
                        align: 'center',
                        key: 'reportStatus',
                        render: (h, params) => {
                            if (params.row.reportStatus == '0') {
                                return h('span', {}, '新建')
                            } else if (params.row.reportStatus == '1') {
                                return h('span', {}, '审核中')
                            } else if (params.row.reportStatus == '2') {
                                return h('span', {}, '待整改')
                            } else if (params.row.reportStatus == '3') {
                                return h('span', {}, '整改中')
                            } else if (params.row.reportStatus == '4') {
                                return h('span', {}, '待验证')
                            } else if (params.row.reportStatus == '5') {
                                return h('span', {}, '验证中')
                            } else if (params.row.reportStatus == '6') {
                                return h('span', {}, '已关闭')
                            } else if (params.row.reportStatus == '7') {
                                return h('span', {}, '验证驳回')
                            }
                        }
                    },
                    {
                        title: '操作',
                        key: 'action',
                        fixed: 'right',
                        width: 120,
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                    },
                                    on: {
                                        click: () => {
                                            this.viewData(params);
                                        }
                                    }
                                }, '详情'),
                                h('Divider', {
                                    props: {
                                        type: 'vertical',
                                    }
                                }, ''),
                                h('A', {
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        fontSize: '14px',
                                        color: (params.row.reportStatus == '2' || params.row.reportStatus == '3' || params.row.reportStatus == '7') ? '' : '#d0d0d0',
                                        pointerEvents: (params.row.reportStatus == '2' || params.row.reportStatus == '3' || params.row.reportStatus == '7') ? '' : 'none'
                                    },
                                    on: {
                                        click: () => {
                                            this.toEdit(params);
                                        }
                                    }
                                }, '整改'),
                            ]);
                        }

                    }
                ],
                ruleCustom: {
                    verifier: [{required: true, validator: verifierVal, trigger: 'blur,change'}],
                    rectifyUser: [{required: true, validator: rectifyUserVal, trigger: 'blur,change'}],
                    rectifyDate: [{required: true, message: '  ', trigger: 'blur,change', type: 'date'}],
                    expirationTime: [{required: true, message: '  ', trigger: 'blur,change', type: 'date'}],
                },
                dataTable: [],
                model1: false,
                loading: false, tableHeight: '',
                viewModal: false,
                viewForm: {},
                setCurrentVerifierName: {},
                setCurrentRectifyUserName: {},


                uploadList: [],
                uploadImgs: [],
                fileList: [],
                auditImgs: [],
                buttonLoading: false, visible: false,
                viewUrl: Api.downloadPTWSchemeFile,
                upUrl: Api.uploadPTWFiles,
                editable: false,
                filesUrl: Api.downloadPTWSchemeFile,
            }
        },
       /* computed: {
            columns1() {
                const columns = [...this.columns];
                const modaleshow = this.form1.ifRectif
                const columns1 = []
                columns.forEach(item => {
                    if (modaleshow == 1) {//已整改
                        if (item.title != '检查名称' && item.title != '检查人' && item.title != '检查日期') {
                            columns1.push(item)
                        }
                    } else if (modaleshow == 0) {
                        if (item.title != '整改结束日期' && item.title != '整改情况描述') {
                            columns1.push(item)
                        }
                    }
                })
                return columns1
            },
        },*/
        mounted: function () {
            this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 145;
            this.query();
        },
        methods: {
            remoteMethod1(query){
                if(this.dataForm.rectifyUser == query){
                        return ;
                }
                if (query !== '') {
                    clearTimeout(this.remoteMethod1.timer);
                    this.remoteMethod1.timer = setTimeout(()=>{
                        this.loading1 = true;
                        let data = {
                            userName: query,
                            orgId: sessionStorage('userId').getObject('userId').orgInfo.parentId
                        };
                        this.$http.get(Api.queryUserByUserName , {params: data}).then((res) => {
                            this.loading1 = false;
                            this.options1 = res.data.data;
                        }).catch(e => {
                            this.loading1 = false;
                        })
                    },200);
                } else {
                    this.options1 = [];
                }
            },
            remoteMethod2(query){
                if(this.dataForm.verifier == query){
                    return ;
                }
                if (query !== '') {
                    clearTimeout(this.remoteMethod2.timer);
                    this.remoteMethod2.timer = setTimeout(()=>{
                        this.loading2 = true;
                        let data = {
                            userName: query,
                            orgId: sessionStorage('userId').getObject('userId').orgInfo.parentId
                        };
                        this.$http.get(Api.queryUserByUserName , {params: data}).then((res) => {
                            this.loading2 = false;
                            this.options2 = res.data.data;
                        }).catch(e => {
                            this.loading2 = false;
                        })
                    },200);
                } else {
                    this.options2 = [];
                }
            },
            handleRemove(file) {
                //删除操作
                let _this = this;
                let config = {
                    title: '系统提示',
                    content: '确认删除图片吗?',
                    okText: '确定',
                    cancelText: '取消',
                    onOk: function () {

                        _this.$Spin.show({
                            render: (h) => {
                                return h('div', [
                                    h('Icon', {
                                        'class': 'demo-spin-icon-load',
                                        props: {
                                            type: 'ios-loading',
                                            size: 18
                                        }
                                    }),
                                    h('div', 'Loading')
                                ])
                            }
                        });
                        _this.uploadImgs.splice(_this.uploadImgs.indexOf(file), 1);

                        _this.$http.delete(Api.downloadPTWSchemeFile + '/' + file.id).then((res) => {
                            /* _this.$Message.success('删除成功');
                             _this.uploadList = [];
                             _this.$http.get(_this.upUrl, {params: {}}).then((res) => {
                                 if(res.data.data!=null){
                                     res.data.data.map((item)=>{
                                         _this.uploadList.push({ name : item.fileName, id : item.id , url : Api.downloadPTWSchemeFile + '/' + item.id});
                                     });
                                 }
                                 //this.downloadUrl = this.downloadUrl + '/' + res.data.id;
                             }).catch(e => {
                                 console.log(e)
                                 this.$Message.error("数据获取失败")
                             })*/
                            _this.$Spin.hide();
                        }).catch(e => {
                            _this.$Spin.hide();
                            _this.$Message.error('删除失败' + e);
                        })
                    },
                    onCancel: function () {
                    }
                }
                this.$Modal.confirm(config);
            },
            handleRemove1(keyID){
                this.fileList = this.fileList.filter(item => {
                    return item.keyID != keyID
                })
            },
            handleFormatError(file) {
                this.$Message.error('格式不正确, 请上传 jpg 或 png');
            },
            handleMaxSize(file) {
                this.$Message.error('图片不能大于1M.');
            },
            handleBeforeUpload(file) {

                if (file.size > 1024 * 1024) {
                    this.$Message.error('图片不能大于1M.');
                    return false;
                }
                var index = file.name.lastIndexOf(".");
                var suffix = file.name.substr(index + 1);

                if (suffix != 'jpg' && suffix != 'jpeg' && suffix != 'png') {
                    this.$Message.error("请上传jpg,jpeg,png格式的图片");
                    return false;
                }

                const check = this.uploadImgs.length < 3;
                if (!check) {
                    this.$Message.error('最多上传3张图片');
                    return false;
                } else {
                    // this.uploadImgs.push(file);
                    let self = this;
                    let keyID = Math.random().toString().substr(2);
                    file['keyID'] = keyID;
                    let reader = new FileReader();
                    reader.readAsDataURL(file);
                    reader.onload = function(ev) { //文件读取成功完成时触发
                        file['imgBase64'] = ev.target.result; //获得文件读取成功后的DataURL,也就是base64编码
                        self.fileList.push(file);
                    }
                }
                return false;
            },

            handleView(name, url) {
                this.viewUrl = url;
                this.imgName = name;
                this.visible = true;
            },

            viewPicture(row) {
                //根据reportFile查询附件
                this.uploadList = [];
                this.$http.get(Api.uploadPTWFiles + '/' + row.reportFile + '/files', {params: {}}).then((res) => {
                    if (res.data.data != null) {
                        res.data.data.map((item) => {
                            this.uploadList.push({
                                name: item.fileName,
                                id: item.id,
                                url: Api.downloadPTWSchemeFile + '/' + item.id
                            });
                        });
                    }
                    //this.downloadUrl = this.downloadUrl + '/' + res.data.id;
                }).catch(e => {
                    console.log(e)
                    this.$Message.error("数据获取失败")
                })
            },

            viewAuditPicture(row) {
                //根据reportFile查询附件
                this.auditImgs = [];
                this.$http.get(Api.uploadPTWFiles + '/' + row.assignId + '/files', {params: {}}).then((res) => {
                    if (res.data.data != null) {
                        res.data.data.map((item) => {
                            this.auditImgs.push({
                                name: item.fileName,
                                id: item.id,
                                url: Api.downloadPTWSchemeFile + '/' + item.id
                            });
                        });
                    }
                    //this.downloadUrl = this.downloadUrl + '/' + res.data.id;
                }).catch(e => {
                    console.log(e)
                    this.$Message.error("数据获取失败")
                })
            },

            handleCancel() {
                this.model1 = false;
            },

            addInfo() {
                this.dataForm = {};
                this.setCurrentVerifierName = {};
                this.setCurrentRectifyUserName = {
                    label: JSON.parse(sessionStorage('paramUserInfo').get('userInfo'))["createUserName"],
                    value: JSON.parse(sessionStorage('paramUserInfo').get('userInfo'))["createUserId"]
                };
                setTimeout(() => {
                    this.$refs.childUser1.setCurrentUser();
                }, 300);
                this.model1 = true;
            },

            setVerifierName(data) {
                this.dataForm.verifierName = data;
            },
            setVerifierId(data) {
                this.dataForm.verifier = data[data.length - 1];
            },

            setRectifyUserName(data) {
                this.dataForm.rectifyUserName = data;
            },
            setRectifyUserId(data) {
                this.dataForm.rectifyUser = data[data.length - 1];
            },

            pageChange(pageNum) {
                this.pagedata.currentPage = pageNum;
                this.query();
            },
            pageSizeChange(pageSize) {
                this.pagedata.pageSize = pageSize;
                this.query();
            },

            toEdit(params) {
                this.dataForm = {};
                this.uploadImgs = [];
                this.fileList = [];
                this.editable = true;
                let url = Api.toChkProblemRectify + '/' + params.row.problemId;
                this.$http.get(url, {}).then((res) => {
                    this.model1 = true;
                    this.chkProblem = res.data.chkProblem;
                    this.chkAssign = res.data.chkAssign;

                    //this.bohui = res.data.bohui;
                    this.bohui = [];

                    if (res.data.chkRectify != null) {
                        this.dataForm = res.data.chkRectify;

                        this.options2=[{}];
                        this.$set(this.options2[0],'userId',res.data.chkRectify.verifier);
                        this.$set(this.options2[0],'userName',res.data.chkRectify.verifierName);
                        this.$set(this.options2[0],'orgInfo',{orgName:'xx'});
                        this.options1=[{}];
                        this.$set(this.options1[0],'userId',res.data.chkRectify.rectifyUser);
                        this.$set(this.options1[0],'userName',res.data.chkRectify.rectifyUserName);
                        this.$set(this.options1[0],'orgInfo',{orgName:'xx'});

                        //处理整改图片ID
                        if (this.dataForm.fileIds != '' && this.dataForm.fileIds != null && this.dataForm.fileIds != undefined) {
                            this.dataForm.fileIds = this.dataForm.fileIds.split(';');
                            this.dataForm.fileIds.map((item) => {
                                this.uploadImgs.push({
                                    name: item,
                                    id: item,
                                    url: Api.downloadPTWSchemeFile + '/' + item
                                });
                            });
                        }
                    } else {
                        this.dataForm = {};
                        this.setCurrentRectifyUserName = {
                            label: JSON.parse(sessionStorage('paramUserInfo').get('userInfo'))["createUserName"],
                            value: JSON.parse(sessionStorage('paramUserInfo').get('userInfo'))["createUserId"]
                        };
                        this.dataForm.rectifyUser = this.setCurrentRectifyUserName.value;
                        this.dataForm.rectifyUserName = this.setCurrentRectifyUserName.label;
                        // this.dataForm.verifier= this.chkAssign.assignUserId
                        // this.dataForm.verifierName= this.chkAssign.assignUserName
                        this.dataForm.verifier= params.row.verifier
                        this.dataForm.verifierName= params.row.verifierName
                        this.uploadImgs = [];
                    }

                    if (this.chkProblem.reportStatus == '0') {
                        this.chkProblem.reportStatusName = '新建';
                    } else if (this.chkProblem.reportStatus == '1') {
                        this.chkProblem.reportStatusName = '审核中';
                    } else if (this.chkProblem.reportStatus == '2') {
                        this.chkProblem.reportStatusName = '待整改';
                    } else if (this.chkProblem.reportStatus == '3') {
                        this.chkProblem.reportStatusName = '整改中';
                    } else if (this.chkProblem.reportStatus == '4') {
                        this.chkProblem.reportStatusName = '待验证';
                    } else if (this.chkProblem.reportStatus == '5') {
                        this.chkProblem.reportStatusName = '验证中';
                    } else if (this.chkProblem.reportStatus == '6') {
                        this.chkProblem.reportStatusName = '已关闭';
                    } else if (this.chkProblem.reportStatus == '7') {
                        this.chkProblem.reportStatusName = '验证驳回';
                    }
                    setTimeout(() => {
                        this.$refs.childUser1.setCurrentUser();
                        this.$refs.childUser2.setCurrentUser();
                    }, 300);

                    this.viewPicture(this.chkProblem);
                    this.viewAuditPicture(this.chkAssign);
                }).catch(e => {
                    this.$Message.error('请求失败' + e);
                })
            },
            viewData(params) {
                debugger
                this.editable = false;
                let url = Api.toChkProblemRectify + '/' + params.row.problemId;
                this.$http.get(url, {}).then((res) => {
                    this.viewModal = true;
                    this.chkProblem = res.data.chkProblem;
                    this.chkAssign = res.data.chkAssign;
                    this.bohui = res.data.bohui;

                    if (this.bohui == null) {
                        this.bohui = [];
                    } else {
                        //处理驳回的图片信息
                        for (let i = 0; i < this.bohui.length; i++) {
                            //处理整改图片ID
                            if (this.bohui[i].chkRectify.fileIds != '' && this.bohui[i].chkRectify.fileIds != null && this.bohui[i].chkRectify.fileIds != undefined) {
                                this.bohui[i].chkRectify.fileIds = this.bohui[i].chkRectify.fileIds.split(';');
                            }
                            //处理验证图片ID
                            if (this.bohui[i].chkVerify != null) {
                                if (this.bohui[i].chkVerify.fileIds != '' && this.bohui[i].chkVerify.fileIds != null && this.bohui[i].chkVerify.fileIds != undefined) {
                                    this.bohui[i].chkVerify.fileIds = this.bohui[i].chkVerify.fileIds.split(';');
                                }
                            }
                        }
                    }


                    if (res.data.chkRectify != null) {
                        this.viewForm = res.data.chkRectify;
                        this.viewForm.verifier= params.row.verifier
                        this.viewForm.verifierName= params.row.verifierName
                        //处理整改图片ID
                        if (this.viewForm.fileIds != '' && this.viewForm.fileIds != null && this.viewForm.fileIds != undefined) {
                            this.viewForm.fileIds = this.viewForm.fileIds.split(';');
                        }
                    } else {
                        this.viewForm = {};
                        this.uploadImgs = [];
                    }

                    if (this.chkProblem.reportStatus == '0') {
                        this.chkProblem.reportStatusName = '新建';
                    } else if (this.chkProblem.reportStatus == '1') {
                        this.chkProblem.reportStatusName = '审核中';
                    } else if (this.chkProblem.reportStatus == '2') {
                        this.chkProblem.reportStatusName = '待整改';
                    } else if (this.chkProblem.reportStatus == '3') {
                        this.chkProblem.reportStatusName = '整改中';
                    } else if (this.chkProblem.reportStatus == '4') {
                        this.chkProblem.reportStatusName = '待验证';
                    } else if (this.chkProblem.reportStatus == '5') {
                        this.chkProblem.reportStatusName = '验证中';
                    } else if (this.chkProblem.reportStatus == '6') {
                        this.chkProblem.reportStatusName = '已关闭';
                    } else if (this.chkProblem.reportStatus == '7') {
                        this.chkProblem.reportStatusName = '验证驳回';
                    }

                    this.viewPicture(this.chkProblem);
                    this.viewAuditPicture(this.chkAssign);

                }).catch(e => {
                    this.$Message.error('请求失败' + e);
                })
            },
            saveData(tag) {
                this.$refs.dataForm.validate((valid) => {
                    if (valid) {
                        let _this = this;
                        let config = {
                            title: '系统提示',
                            content: '提交后不可修改，是否确认提交?',
                            okText: '确定',
                            cancelText: '取消',
                            onOk: function () {
                                _this.buttonLoading = true
                                _this.dataForm.expirationTime = _this.formatDate(new Date(_this.dataForm.expirationTime), 'yyyy-MM-dd');
                                _this.dataForm.rectifyDate = _this.formatDate(new Date(_this.dataForm.rectifyDate), 'yyyy-MM-dd');
                                _this.options1.forEach(item=>{
                                    if(item.userId == _this.dataForm.rectifyUser)
                                        _this.dataForm.rectifyUserName = item.userName;
                                })
                                _this.options2.forEach(item=>{
                                    if(item.userId == _this.dataForm.verifier)
                                        _this.dataForm.verifierName = item.userName;
                                })
                                if (tag == '1') {
                                    //保存
                                    _this.dataForm.reportStatus = '3';
                                } else if (tag == '2') {
                                    //提交
                                    _this.dataForm.reportStatus = '4';
                                }
                                _this.dataForm.problemId = _this.chkProblem.problemId;
                                _this.dataForm.assignId = _this.chkAssign.assignId;
                                delete _this.dataForm['fileIds'];
                                _this.$http.post(Api.saveOrSubmitChkRectify, _this.dataForm).then((res) => {
                                    if (_this.uploadImgs.length > 0 || _this.fileList.length>0) {
                                        let formData = new FormData();
                                        for (let i = 0; i < _this.uploadImgs.length; i++) {
                                            formData.append("files", _this.uploadImgs[i]);
                                        }
                                        for (let i = 0; i < _this.fileList.length; i++) {
                                            formData.append("files", _this.fileList[i]);
                                        }
                                        _this.$http.post(Api.uploadPTWFiles + '/' + res.data.rectifyId + '/files/picture', formData).then((res) => {
                                            if (res.data.result == "success") {
                                                _this.$Message.success("保存成功");
                                                _this.uploadImgs = [];
                                                //_this.uploadList.push(file);
                                                _this.model1 = false;
                                                _this.query();
                                            } else {
                                                _this.$Message.error("附件上传失败");
                                                _this.model1 = false;
                                                _this.query();
                                            }
                                            _this.buttonLoading = false
                                        }).catch(e => {
                                            console.log(e);
                                            _this.buttonLoading = false
                                            _this.$Message.error("附件上传失败");
                                        })
                                    } else {
                                    _this.$Message.success("提交成功");
                                    _this.model1 = false;
                                    _this.query();
                                    _this.buttonLoading = false
                                    }
                                }).catch(e => {
                                    _this.model1 = false;
                                    _this.query();
                                    _this.buttonLoading = false
                                    _this.$Message.error("数据保存失败")
                                })
                            },
                            onCancel: function () {
                            }
                        }
                        this.$Modal.confirm(config);

                    } else {
                        this.$Message.error('请填报完整!');
                    }
                })
            },
            query() {
                this.loading = true;
                //reportStatus 状态值说明 0：新建 1：审核中 2：待整改 3 整改中 4 待验证 5 验证中 6 已关闭 7验证驳回
                if (this.form1.ifRectif == '1') {
                    this.form1.reportStatus='4,5,6'
                }else {
                    this.form1.reportStatus='2,3,7'
                }
                let data = {
                    currentPage: this.pagedata.currentPage,
                    size: this.pagedata.pageSize,
                    userId: JSON.parse(sessionStorage('paramUserInfo').get('userInfo'))["createUserId"],
                    checkCategory: this.$route.query.id
                }

                data = Object.assign(data, JSON.parse(JSON.stringify(this.form1)));

                let url = Api.getChkProblemRectifyList;
                this.$http.get(url, {params: data}).then((res) => {
                    this.dataTable = res.data.data;
                    this.pagedata.total = res.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            reset() {
                this.form1 = {ifRectif:'0'};
                this.query();
            },

            formatDate(date, fmt) {
                if (/(y+)/.test(fmt)) {
                    fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
                }
                let o = {
                    'M+': date.getMonth() + 1,
                    'd+': date.getDate(),
                    'h+': date.getHours(),
                    'm+': date.getMinutes(),
                    's+': date.getSeconds()
                };
                for (let k in o) {
                    if (new RegExp(`(${k})`).test(fmt)) {
                        let str = o[k] + '';
                        fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str));
                    }
                }
                return fmt;
            },
            padLeftZero(str) {
                return ('00' + str).substr(str.length);
            },
            changeSelect(value){
                if (value == 1) {
                    this.reportStatus=[
                        {id:4,name:'待验证'},
                        {id:5,name:'验证中'},
                        {id:6,name:'已关闭'},
                    ]
                }else {
                    this.reportStatus=[
                        {id:2,name:'待整改'},
                        {id:3,name:'整改中'},
                        {id:7,name:'验证驳回'}
                    ]
                }

                this.pagedata.currentPage = 1;
                this.query();
            },
            switchQuery(flag) {
                this.switchFlag = flag;
                if (!this.switchFlag) {
                    this.tableHeight = this.tableHeight + 44;
                } else {
                    this.tableHeight = this.tableHeight - 44;
                }
            },
        },
    }
</script>
<style lang='css'>
    @import './../../../../index.css';

    .demo-upload-list {
        display: inline-block;
        width: 60px;
        height: 60px;
        text-align: center;
        line-height: 60px;
        border: 1px solid transparent;
        border-radius: 4px;
        overflow: hidden;
        background: #fff;
        position: relative;
        box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
        margin-right: 4px;
    }

    .demo-upload-list img {
        width: 100%;
        height: 100%;
    }

    .demo-upload-list-cover {
        display: none;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, .6);
    }

    .demo-upload-list:hover .demo-upload-list-cover {
        display: block;
    }

    .demo-upload-list-cover i {
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        margin: 0 2px;
    }
</style>
